/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.buzzwords.dataaccess;

import com.buzzwords.behaviors.DatabaseBehavior;
import java.util.List;

/**
 *
 * @author potlow
 */
public abstract class Database {
    protected DatabaseBehavior databaseBehavior;

    public boolean performCreate(Object value) {
        return databaseBehavior.create(value);
    }

    public List<Object> performRead(Object value) {
        return databaseBehavior.read(value);
    }

    public boolean performUpdate(Object value) {
        return databaseBehavior.update(value);
    }

    public boolean performDelete(Object value) {
        return databaseBehavior.delete(value);
    }

    public DatabaseBehavior getDatabaseBehavior() {
        return databaseBehavior;
    }

    public void setDatabaseBehavior(DatabaseBehavior databaseBehavior) {
        this.databaseBehavior = databaseBehavior;
    }
}
